From 3e4bb2a59a1dddd9c36847d4cb76e017d90caaf6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 21 Jan 2016 22:03:26 +0100 Subject: [PATCH] generate and install pkgconfig file --- debian/libbuilder/Makefile | 19 +++++++++++++++++-- debian/libbuilder/juce.pc.in | 17 +++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 debian/libbuilder/juce.pc.in diff --git a/debian/libbuilder/Makefile b/debian/libbuilder/Makefile index 3a2f70a4..e5566b34 100644 --- a/debian/libbuilder/Makefile +++ b/debian/libbuilder/Makefile @@ -105,7 +105,7 @@ TARGET := libjuce.so OBJECTS=$(SOURCES:%.cpp=$(OBJDIR)/%.o) -.PHONY: clean install install-lib install-headers test +.PHONY: clean install install-lib install-headers install-pkgconfig test $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES) @echo Linking juce_dll @@ -119,20 +119,35 @@ $(OBJDIR)/%.o: %.cpp clean: @echo Cleaning juce_dll rm -rf build + rm -rf juce.pc install-lib: $(OUTDIR)/$(TARGET) @echo Installing juce_dll install -d $(DESTDIR)$(libdir) install -m664 $^ $(DESTDIR)$(libdir)/libjuce.so +install-pkgconfig: juce.pc + @echo Installing juce_dll + install -d $(DESTDIR)$(libdir)/pkgconfig + install -m664 $^ $(DESTDIR)$(libdir)/pkgconfig/$^ install-headers: @echo Installing juce_dll install -d $(DESTDIR)$(includedir)/juce cd $(JUCE_PATH) && find modules/ -type f -name "juce_*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \; cd $(JUCE_PATH) && find modules/juce_box2d/box2d/ -type f -name "*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \; -install: install-headers install-lib +install: install-headers install-lib install-pkgconfig -include $(OBJECTS:%.o=%.d) test: @echo TARGET_ARCH $(TARGET_ARCH) + +juce.pc: juce.pc.in + sed \ + -e 's|@prefix@|$(prefix)|g' \ + -e 's|@libdir@|$(libdir)|g' \ + -e 's|@includedir@|$(includedir)|g' \ + -e 's|@PACKAGE_VERSION@|$(SONAME)|g' \ + -e 's|@REQUIRED_PKG@|$(JUCELIBS)|g' \ + -e 's|@REQUIRED_LIBS@|$(JUCELIBS_LIBS)|g' \ + $^ > $@ diff --git a/debian/libbuilder/juce.pc.in b/debian/libbuilder/juce.pc.in new file mode 100644 index 00000000..7620e898 --- /dev/null +++ b/debian/libbuilder/juce.pc.in @@ -0,0 +1,17 @@ +# JUCE pkg-config file for Debian + +prefix=@prefix@ +libdir=@libdir@ +includedir=@includedir@ + +############################### +# core configuration +Name: juce +Description: Jules' Utility Class Extensions +Version: @PACKAGE_VERSION@ +Requires.private: @REQUIRED_PKG@ +Cflags: -I${includedir}/juce +Libs: -ljuce +Libs.private: @REQUIRED_LIBS@ + + -- 2.30.2